#ifndef _OBJECT_H_
#define _OBJECT_H_

#include "util/exception.h"
#include "util/wstr.h"

#include <string>
#include <map>

#include <cstring>

namespace roperator{

struct ObjectException : public util::Exception{
	ObjectException(std::wstring errmsg) : util::Exception(errmsg) {}
};

struct ObjectXMLException : public ObjectException{
	ObjectXMLException(std::wstring param) :
		ObjectException(W(L"Error when parsing xml file: ") + param + L".") {}
};

//Parsing routines for object configs
class Object{
public:
	
	std::map<std::wstring, std::wstring>triggers;

	
	void load(std::wstring& file);
	void load(const char* file);
	
	void dump();
	
	std::wstring name;
	
};


}

#endif
